package domain.components;

import images.Images;

import com.uqbar.vainilla.DeltaState;
import com.uqbar.vainilla.GameComponent;

import domain.scenes.MainGameScene;

public class IndicadorActualWorm extends GameComponent<MainGameScene> {
	
	private double finalY;
	private double speed = 125;

	
	public IndicadorActualWorm(double x, double y){
		super(x,0);
		
		this.finalY = y;
		this.setAppearance(Images.images.getImage("indicador"));
	}
	
	@Override
	public void update(DeltaState deltaState) {
		if(this.getY()<this.finalY-50){
			this.move(0, this.speed*deltaState.getDelta());
		}
	}

}
